﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace TrackSystem.EntityFramework.Migrations
{
    /// <inheritdoc />
    public partial class cm2 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<string>(
                name: "InitValue",
                table: "var",
                type: "longtext",
                nullable: true,
                oldClrType: typeof(double),
                oldType: "double")
                .Annotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.UpdateData(
                table: "var",
                keyColumn: "Id",
                keyValue: 1,
                column: "InitValue",
                value: null);

            migrationBuilder.UpdateData(
                table: "var",
                keyColumn: "Id",
                keyValue: 2,
                column: "InitValue",
                value: null);

            migrationBuilder.UpdateData(
                table: "var",
                keyColumn: "Id",
                keyValue: 3,
                column: "InitValue",
                value: null);

            migrationBuilder.UpdateData(
                table: "var",
                keyColumn: "Id",
                keyValue: 4,
                column: "InitValue",
                value: null);

            migrationBuilder.UpdateData(
                table: "var",
                keyColumn: "Id",
                keyValue: 5,
                column: "InitValue",
                value: null);

            migrationBuilder.UpdateData(
                table: "var",
                keyColumn: "Id",
                keyValue: 6,
                column: "InitValue",
                value: null);

            migrationBuilder.UpdateData(
                table: "var",
                keyColumn: "Id",
                keyValue: 7,
                column: "InitValue",
                value: null);

            migrationBuilder.UpdateData(
                table: "var",
                keyColumn: "Id",
                keyValue: 8,
                column: "InitValue",
                value: null);

            migrationBuilder.UpdateData(
                table: "var",
                keyColumn: "Id",
                keyValue: 9,
                column: "InitValue",
                value: null);

            migrationBuilder.UpdateData(
                table: "var",
                keyColumn: "Id",
                keyValue: 10,
                column: "InitValue",
                value: null);

            migrationBuilder.UpdateData(
                table: "var",
                keyColumn: "Id",
                keyValue: 11,
                column: "InitValue",
                value: null);

            migrationBuilder.UpdateData(
                table: "var",
                keyColumn: "Id",
                keyValue: 12,
                column: "InitValue",
                value: null);
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AlterColumn<double>(
                name: "InitValue",
                table: "var",
                type: "double",
                nullable: false,
                defaultValue: 0.0,
                oldClrType: typeof(string),
                oldType: "longtext",
                oldNullable: true)
                .OldAnnotation("MySql:CharSet", "utf8mb4");

            migrationBuilder.UpdateData(
                table: "var",
                keyColumn: "Id",
                keyValue: 1,
                column: "InitValue",
                value: 0.0);

            migrationBuilder.UpdateData(
                table: "var",
                keyColumn: "Id",
                keyValue: 2,
                column: "InitValue",
                value: 0.0);

            migrationBuilder.UpdateData(
                table: "var",
                keyColumn: "Id",
                keyValue: 3,
                column: "InitValue",
                value: 0.0);

            migrationBuilder.UpdateData(
                table: "var",
                keyColumn: "Id",
                keyValue: 4,
                column: "InitValue",
                value: 0.0);

            migrationBuilder.UpdateData(
                table: "var",
                keyColumn: "Id",
                keyValue: 5,
                column: "InitValue",
                value: 0.0);

            migrationBuilder.UpdateData(
                table: "var",
                keyColumn: "Id",
                keyValue: 6,
                column: "InitValue",
                value: 0.0);

            migrationBuilder.UpdateData(
                table: "var",
                keyColumn: "Id",
                keyValue: 7,
                column: "InitValue",
                value: 0.0);

            migrationBuilder.UpdateData(
                table: "var",
                keyColumn: "Id",
                keyValue: 8,
                column: "InitValue",
                value: 0.0);

            migrationBuilder.UpdateData(
                table: "var",
                keyColumn: "Id",
                keyValue: 9,
                column: "InitValue",
                value: 0.0);

            migrationBuilder.UpdateData(
                table: "var",
                keyColumn: "Id",
                keyValue: 10,
                column: "InitValue",
                value: 0.0);

            migrationBuilder.UpdateData(
                table: "var",
                keyColumn: "Id",
                keyValue: 11,
                column: "InitValue",
                value: 0.0);

            migrationBuilder.UpdateData(
                table: "var",
                keyColumn: "Id",
                keyValue: 12,
                column: "InitValue",
                value: 0.0);
        }
    }
}
